﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class AniEffect_RB : AniEffect
{
	public void play (OReportDetail detail, CallBack complete)
	{
		try {
			int id = int.Parse (detail.effectData.ToString ());
			if (OReportEffect.Instance.aniEffectBuffDic.ContainsKey (detail.self)) {
				Dictionary<int?, GameObject> buffDic = OReportEffect.Instance.aniEffectBuffDic [detail.self];
				if (buffDic.ContainsKey (id)) {
					GameObject buff = buffDic [id];
					buffDic.Remove (id);
					MonoBehaviour.Destroy (buff);
				}
			}
			
		} catch (System.Exception e) {
		}
		
		complete ();
	}
}
